package com.zhangwei.day31volley;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.NetworkImageView;
import com.zhangwei.day31volley.utils.AppImageCache;
import com.zhangwei.day31volley.utils.VolleyHelper;

import java.util.List;

/**
 * @author zhangwei
 * @version V1.0
 * @Title: Advanced
 * @Package com.zhangwei.day31volley
 * @Description:
 * @date 15/10/16 上午11:35
 */

public class NetWorkAdapber extends BaseAdapter {
    private Context context;
    private List<String> list;

    public NetWorkAdapber(Context context, List<String> list) {
        this.context = context;
        this.list = list;


    }

    @Override
    public int getCount() {
        return 0;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        ViewHolder holder = new ViewHolder();

        holder.nwImg.setDefaultImageResId(R.mipmap.ic_launcher);
        holder.nwImg.setErrorImageResId(R.mipmap.ic_launcher);
        holder.nwImg.setImageUrl(list.get(position), VolleyHelper.getInstance().getImageLoader());


        return null;
    }

    private static class ViewHolder {

        NetworkImageView nwImg;


    }


}
